package com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.common.exception;

import com.iwhalecloud.citybrain.flow.platform.manager.common.ErrorCode;

/**
 * @author lilh
 * @date 2021/3/3 11:04
 */
public class BusiException extends RuntimeException {

    private static final long serialVersionUID = 2595521277677692531L;

    private ErrorCode errorCode;

    public BusiException(ErrorCode errorCode) {
        super(errorCode.errMessage());
        this.errorCode = errorCode;
    }

    public BusiException(String message) {
        super(message);
    }

    public BusiException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusiException(Throwable cause) {
        super(cause);
    }

    public BusiException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }
}
